<template>
    <div id='aaaaa' class='detail_info'>
        <div class="header_title">
            {{info.title}}
        </div>
        <div class="describe">
            <div class="time">发文日期：{{info.releaseDate}}</div>
            <div class="title"><span>发文来源：{{info.releaseDept}}</span></div>
            <div>专栏: {{title}}</div>
        </div>
        <div class="content" v-html="info.contentStr"></div>
    </div>
</template>
<script>
import pdfImg from '@/assets/svg/fontApp/pdf_icon.svg'
import { mapState, mapActions } from 'vuex';
import headerLoge1 from '@/assets/svg/login/login_logo.svg'
export default {
    name: '',
    props: [''],
    data() {
        return {
            info: {},
            pdfImg: pdfImg,
            type: '',
            id: '',
            title: '',
            
        };
    },
    components: {},
    computed: {},
    beforeMount() { },
    mounted() {
        this.type = this.$route.params.type;
        this.changeHeader([
            { key: 'bgColor', value: 'rgba(0,0,0,0.03)' },
            { key: 'logoImg', value: headerLoge1 },
        ])
    },
    methods: {
        ...mapActions('extend/header', [
            'changeHeader'
        ]),

        getInfo(id, title) {
            this.id = id;
            this.title = title;
            this.$http.$get('InformationDetails', { params: { id } }).then(res => {
                if (res.code == 200) {
                    this.info = res.data
                    // 获取附件信息
                    this.$emit('fileInfo', this.info.doc)
                    return
                }
                this.$Message.error(res.msg);
            })
        },
        print() {
            const printHTML = document.querySelector('#aaaaa').innerHTML
            // 将打印的区域赋值，进行打印
            window.document.body.innerHTML = printHTML
            window.print() // 调用window打印方法
            window.location.reload() // 打印完成后重新加载页面
        }
    },
    watch: {}
}
</script>
<style lang='less' scoped>
.detail_info {
    background: #ffffff;
    width: 100%;
    .header_title {
        padding: 0 20px;
        font-size: 24px;
        font-family: PingFang SC-Semibold, PingFang SC;
        font-weight: 600;
        color: #17233d;
        width: 100%;
        text-align: center;
    }
    .describe {
        display: flex;
        justify-content: space-between;
        height: 45px;
        align-items: center;
        border-bottom: 1px solid #e8eaec;
        .title {
            display: flex;
            span {
                font-size: 16px;
                font-family: PingFang SC-Regular, PingFang SC;
                font-weight: 400;
                color: #808695;
            }
            .file {
                cursor: pointer;
                margin-left: 40px;
                display: flex;
                justify-content: center;
                align-items: center;
                img {
                    width: 16px;
                }
                span {
                    margin-left: 10px;
                    font-size: 16px;
                    font-family: PingFang SC-Regular, PingFang SC;
                    font-weight: 400;
                    color: #3399ff;
                }
            }
        }
    }
    .content {
        margin-top: 10px;
        height: 480px;
        overflow: auto;
    }
}
</style>